import React, { Suspense } from 'react'
import ReactDOM from 'react-dom/client'
import './app.scss'
// 没有min会报错y
import 'antd/dist/antd.min.css'
import router from './router/index'
import { RouterProvider } from 'react-router-dom'

// 重写函数为了生产环境不打印日志
if (process.env.NODE_ENV === 'production') {
  console.log = console.dir = () => {}
}
const root = ReactDOM.createRoot(document.getElementById('root'))
root.render(
  <Suspense fallback={<div>loading</div>}>
    <RouterProvider router={router}></RouterProvider>
  </Suspense>
)
